/*******************************************OVERVIEW*******************************************************
 
 Political Shocks and Asset Prices
 
 Replication do file
 
 Table 3: Robustness Tests
 
 Version July 9 2021 
 
  
********************************************************************************************************************/

clear
set more off
#delimit ;


/*Set Directory -- You will need to adjust this line of code accordingly */; 


cd "/Users/ssaiegh/Files/Mac/UCSD/Carnahan/Shocks/Replication Files";

/*Create Log File*/;

log using "Table 3", replace text;


/*Load Data File*/;


use "results_sp_argentina_2020.dta";


/*Panel A: Excluding Holiday Closures*/;


ttest ratio_dol==0 if F.event==1 & F.holiday==0;
ttest ratio_dol==0 if event==1 & holiday==0;

ttest ratio_dol==0 if F.steward==1 & F.holiday==0;
ttest ratio_dol==0 if steward==1 & holiday==0;

ttest ratio_dol==0 if F.steward==1 & F.gov_change==0 & F.holiday==0;
ttest ratio_dol==0 if steward==1 & gov_change==0 & holiday==0;

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.holiday==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & holiday==0; 

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.dem_change==0 & F.holiday==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & dem_change==0 & holiday==0; 

ttest ratio_dol==0 if F.dem_change==1 & F.holiday==0;
ttest ratio_dol==0 if dem_change==1 & holiday==0;

ttest ratio_dol==0 if F.elec==1 & F.holiday==0;
ttest ratio_dol==0 if elec==1 & holiday==0;

ttest ratio_dol==0 if F.terror==1 & F.holiday==0;
ttest ratio_dol==0 if terror==1 & holiday==0;

/*Panel B: Excluding Holiday and Weekend Closures (Except Elections and Planned Succesions)*/;


ttest ratio_dol==0 if F.event==1 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if event==1 & holiday==0 & week_no_elec==0;

ttest ratio_dol==0 if F.steward==1 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if steward==1 & holiday==0 & week_no_elec==0;

ttest ratio_dol==0 if F.steward==1 & F.gov_change==0 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if steward==1 & gov_change==0 & holiday==0 & week_no_elec==0;

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.holiday==0 & F.week_no_elec==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & holiday==0 & week_no_elec==0; 

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.dem_change==0 & F.holiday==0 & F.week_no_elec==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & dem_change==0 & holiday==0 & week_no_elec==0; 

ttest ratio_dol==0 if F.dem_change==1 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if dem_change==1 & holiday==0 & week_no_elec==0;

ttest ratio_dol==0 if F.elec==1 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if elec==1 & holiday==0 & week_no_elec==0;

ttest ratio_dol==0 if F.terror==1 & F.holiday==0 & F.week_no_elec==0;
ttest ratio_dol==0 if terror==1 & holiday==0 & week_no_elec==0;

/*Panel C: Excluding Holiday and All Weekend Closures*/;


ttest ratio_dol==0 if F.event==1 & F.holiday==0 & F.weekend==0;
ttest ratio_dol==0 if event==1 & holiday==0 & weekend==0;

ttest ratio_dol==0 if F.steward==1 & F.holiday==0 & F.weekend==0;
ttest ratio_dol==0 if steward==1 & holiday==0 & weekend==0;

ttest ratio_dol==0 if F.steward==1 & F.gov_change==0 & F.holiday==0 & F.weekend==0;
ttest ratio_dol==0 if steward==1 & gov_change==0 & holiday==0 & weekend==0;

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.holiday==0 & F.weekend==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & holiday==0 & weekend==0; 

ttest ratio_dol==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799 & F.dem_change==0 & F.holiday==0 & F.weekend==0; 
ttest ratio_dol==0 if gov_change==1 & case!=3671 & case!=3799 & dem_change==0 & holiday==0 & weekend==0; 

ttest ratio_dol==0 if F.dem_change==1 & F.holiday==0 & F.weekend==0;
ttest ratio_dol==0 if dem_change==1 & holiday==0 & weekend==0;


ttest ratio_dol==0 if F.terror==1 & F.holiday==0 & F.weekend==0;
ttest ratio_dol==0 if terror==1 & holiday==0 & weekend==0;

/*Panel D: Intraday Asset Prices*/;


gen tr_1=max(high,L.close);
gen tr_2=min(low,L.close);
gen true=(tr_1-tr_2)/L.close;
replace true=. if case_id<6698;

gen ratio=log(true/L.true);

ttest ratio==0 if F.event==1;
ttest ratio==0 if event==1;


ttest ratio==0 if F.steward==1;
ttest ratio==0 if steward==1;


ttest ratio==0 if F.steward==1 & F.gov_change==0;
ttest ratio==0 if steward==1 & gov_change==0;


ttest ratio==0 if F.gov_change==1 & F.case!=3671 & F.case!=3799; 
ttest ratio==0 if gov_change==1 & case!=3671 & case!=3799; 


ttest ratio==0 if F.dem_change==1;
ttest ratio==0 if dem_change==1;


ttest ratio==0 if F.elec==1;
ttest ratio==0 if elec==1;






log c;
